home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / hostpag2.zip / HOSTPAGE.SCR < prev   
Text File  |  1991-12-05  |  4KB  |  98 lines

  1. ;HOSTPAGE.SCR...Written by Steve Wilson on 12-5-91
  2. ;
  3. ;         Special thanks to Rick Dexter for ideas from his "PAGER.SCR".
  4. ;
  5. ;           "       "    "  John Friel   "    "    "    "  "RING.SCR".
  6. ;
  7. Graphics ANSI                ;this is standard Qmodem setup.
  8. TurnON   8_BIT
  9. TurnOFF  LINEFEED
  10. TurnOFF  XON/XOFF
  11. TurnON   NOISE
  12. TurnOFF  MUSIC
  13. TurnON   SCROLL
  14. TurnOFF  PRINT
  15. TurnOFF  ECHO
  16. TurnOFF  SPLIT
  17. TurnON   BS_DEL
  18. ; --- these are strings for counters within the program
  19. STRING RINGNUM, CYCLES, PAGES, TOTALRINGS
  20. ASSIGN CYCLES       0        ;number of waitfor timeouts, used for debugging
  21. ASSIGN PAGES        0        ;number of times program dialed pager
  22. ASSIGN TOTALRINGS   0        ;total number of rings of the phone
  23. ; --- you might want to fool around with these init strings:
  24. Reset:
  25. SEND "ATZ^M"                 ;reset modem
  26. WAITFOR "OK"
  27. SEND "ATE1L3S0=0S8=1S10=50S11=0X4^M"  ;initialize modem
  28. WAITFOR     "OK"
  29. ;procedure Start --- clear counters and screen, display sign on
  30. Start:
  31. TimeOut  30 Start            ;set waitfor timeout to 30 seconds and execute
  32.                              ;procedure "start" upon timeout
  33. ASSIGN RINGNUM      0        ;upon timeout, clear ring count to 0
  34. CLRSCR
  35. NOTE "AUTOMATIC PAGER/HOST SCRIPT ACTIVATED..."
  36. NOTE "Waiting for calls..."
  37. NOTE " $CYCLES cycles, $TOTALRINGS rings, $PAGES pages"
  38. INCR CYCLES                  ;keep track of number of cycles for debugging
  39. WAITFOR     "RING"           ;wait for "RING" or timeout, either execute
  40.                              ;procedure CountRings or timeout to Start procedure
  41. GOTO CountRings
  42. ;procedure CountRings --- increment number of rings and check for pick up value
  43. CountRings:
  44. INCR        RINGNUM          ;current cycle - number of rings
  45. INCR        TOTALRINGS       ;total rings since program started
  46. NOTE            " $RINGNUM  Ringy-Dingy...Is This A Host Call?"
  47. TimeOut    6      Oneswitch  ;set timeout for 6 secs, then ready host.
  48. WAITFOR     "RING"
  49. TimeOut    6      Start
  50. INCR   RINGNUM
  51. INCR   TOTALRINGS
  52. NOTE            " $RINGNUM  Ringy-Dingies...Nope, Guess Not!!"
  53. WAITFOR     "RING"
  54. TimeOut    7      Start
  55. INCR   RINGNUM
  56. INCR   TOTALRINGS
  57. NOTE            " $RINGNUM  Ringy-Dingies...Wake Up Answering Machine!!"
  58. WAITFOR     "RING"
  59. TimeOut    7      Start
  60. INCR   RINGNUM
  61. INCR   TOTALRINGS
  62. NOTE            " $RINGNUM  Ringy-Dingies...I'm Gonna BEEP You!!"
  63. IF $RINGNUM = "4" DialPager    ;Call the pager 80 seconds after the 4th ring.
  64. GOTO Reset
  65. ;procedure Oneswitch --- Starts host if called again within 15 seconds.
  66. Oneswitch:
  67. NOTE        "Guess So...I'll Start The Host On The Next Ring..."  
  68. TimeOut  15   Start
  69. WAITFOR "RING"
  70. HOST SINGLE
  71. SEND "ATM1H0"
  72. WAITFOR "OK"
  73. GOTO Reset
  74. ;procedure DialPager --- Waits about 80 seconds and dials pager number
  75. DialPager:
  76. Timeout    30    Start
  77. NOTE
  78. NOTE               "Waiting For Caller To Leave Message..."
  79. PAUSE 170000  ;These pauses total about eighty seconds...
  80. PAUSE 170000  ;If your modem supports the X4 hayes command, this is perfect.
  81. NOTE                "Now Calling The Electronic Leash..."
  82. ;---Put your pager and home number here. I've found that digital display pagers 
  83. ;---need about 8 seconds delay between calling and entering the display number.
  84. ;---S8=1 will set the comma to a one second pause.(two seconds is the default)
  85. SEND        "ATDT*70,1-800-555-5555,,,,,,,,555-5555,#^M"
  86. ;-----------(*70, turns off call waiting...If you don't have it, don't use it!)  
  87. ;---My modem returns a "BUSY" when the page is complete, (it supports X4)
  88. ;---also, if someone is very long winded leaving their message, the modem 
  89. ;---will return "NO DIALTONE". This will cause it to wait and try again.
  90. ;---If your modem doesn't support X4, it won't react to "BUSY" or "NO DIALTONE"
  91. ;---so you may need to replace this WAITFOR with a PAUSE 150000 (about 25 secs)
  92. ;---and remove the WHEN line.
  93. WAITFOR     "BUSY"
  94. WHEN   "NO DIALTONE"     Dialpager
  95. HANGUP
  96. INCR PAGES                   ;total pages since program started
  97. GOTO Reset                   ;loop back to beginning
  98.